package org_enum

import "gitee.com/lailonghui/vehicle-supervision-framework/pkg/dicts"

// 组织-工程车企业状态
type orgEnginEnterpriseStatus int

var OrgEnginEnterpriseStatus orgEnginEnterpriseStatus

// 正常
func (c *orgEnginEnterpriseStatus) Normal() int {
	return 1
}

// 停止受理
func (c *orgEnginEnterpriseStatus) Stop() int {
	return 2
}

// 清退
func (c *orgEnginEnterpriseStatus) Clear() int {
	return 3
}

func (c *orgEnginEnterpriseStatus) ToText(value int) string {
	switch value {

	case 1:
		return "正常"

	case 2:
		return "停止受理"

	case 3:
		return "清退"

	}
	return ""
}

func (c *orgEnginEnterpriseStatus) ToDict(value int) *dicts.IntDict {
	return &dicts.IntDict{
		Text:  c.ToText(value),
		Value: value,
	}
}

func (c *orgEnginEnterpriseStatus) ToValue(text string) int {
	switch text {

	case "正常":
		return 1

	case "停止受理":
		return 2

	case "清退":
		return 3

	}
	return 0
}
